Release 10.1A: OpenEdge Development:
.NET Open Clients
Passing TABLE and TABLE-HANDLE parameters
This section describes mapping 4GL temp-tables to ADO.NET DataTables, using the
TABLEandTABLE-HANDLEparameters.Progress 4GL procedures can pass
TABLEorTABLE-HANDLEparameters to an AppServer. This is a convenient and efficient way to pass relational data between the client and the AppServer code. The .NET Open Client environment provides the same capability using an ADO.NET DataTable. A .NET Open Client passes a 4GLTABLEparameter using an ADO.NET strongly typed DataTable object that is generated by ProxyGen and mapped to the specified temp-table. This strongly typed DataTable object inherits fromProgress.Open4GL.ProDataTable, which in turn inherits from the standard ADO .NET class,System.Data.DataTable.
TABLE–HANDLEparameters allow the transfer of dynamic temp-tables between Open Clients and the AppServer, without requiring a complete, static definition of the table on each side of the transfer (as withTABLEparameters). A .NET Open Client passes a 4GLTABLE-HANDLEparameter using an ADO.NET DataTable object,System.Data.DataTable.For each unique static temp-table (
TABLEparameter), ProxyGen generates a strongly typed DataTable class,TypedDataTable.cs.TypedDataTableis the name of the static temp-table in the 4GL procedure, appended withDataTable. For example, in a procedure with a static temp-tableCustTT,TypedDataTableisCustTTDataTable. If other temp-table parameters in other methods in the proxy share the same schema, ProxyGen does not create additional strongly typed DataTable classes but uses the same strongly typed DataTable class for these methods. The name of the temp-table parameter does not matter when comparing the schema of temp-table parameters. However, field names, types, and indexes do need to match. (This differs from the Progress 4GL in which field names and indexes do not need to match.)Also, if ProxyGen detects two or more temp-table parameters with the same name but different schemas, ProxyGen creates multiple strongly typed DataTable classes, one for each unique schema. ProxyGen appends a unique number to the end of the temp-table name, to create unique class names. For example, if multiple procedures define a static temp-table
CustTT, each with a different schema,TypedDataTablecan beCustTTDataTable,CustTT2DataTable, and so on.All strongly typed DataTable classes are defined in the following namespace:
Where
namespaceis the namespace you optionally entered on the .NET tab of the Generate dialog box in ProxyGen. (See the "Namespace for proxy objects" section.)This section covers the following topics:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |